#include <standard.hlsli>



struct VS_Depth_Input
{
	float4 Position : POSITION0;
};
struct VS_Depth_Output
{
	float4 Position : POSITION0;
	float4 Pos2DAsSeenByLight : TEXCOORD0;
};

VS_Depth_Output vs_main(VS_Depth_Input input)
{
	VS_Depth_Output output;
	float4 worldPosition = mul(input.Position, world);
		output.Position = mul(worldPosition, lightViewMatrix);
	output.Pos2DAsSeenByLight = output.Position;
	return output;
}

float4 ps_main(VS_Depth_Output input) : SV_TARGET0
{
	return input.Pos2DAsSeenByLight.z / input.Pos2DAsSeenByLight.w;
}